<?php
/**
 * Created by PhpStorm.
 * User: 哇咔咔
 * Date: 17-9-4
 * Time: 上午11:37
 */

defined('BASEPATH') OR exit('No direct script access allowed');

class MY_Controller extends CI_Controller {
    function __construct(){
        parent::__construct();
}


    //公司基本信息
    function company(){
        $arr = array(
            'mobile'=>'13888888881',

        );
        $company = $this->db->where($arr)->get('company')->row_array();
        return $company;
    }
    function pic_url($id){
        $arr =array(
            'logo'=>'http://139.196.110.242:12394/company/'.$id.'/',//公司logo
            'pic'=>'http://139.196.110.242:12394/carousel/'.$id.'/',//轮播图
            'menu'=>'http://139.196.110.242:12394/menu/'.$id.'/',//菜单主图
            'news'=>'http://139.196.110.242:12394/news/'.$id.'/',//新闻图
            'product'=>'http://139.196.110.242:12394/product/'.$id.'/',//项目
            'team'=>'http://139.196.110.242:12394/team/'.$id.'/',//团队
            'service'=>'http://139.196.110.242:12394/service/'.$id.'/',//服务
            );
        return $arr;
    }
    function column($column){
        $arr = array(
            'name'=>$column,
        );
        $cus_menu = $this->db->where($arr)->get('cus_menu')->row_array();
        return $cus_menu;
    }

    function arr(){
        $data['company']=self::company();
        $arr1 = array(
            'company_id'=>$data['company'] ['id'],
            'del_flag' =>  '0'
        );
        return $arr1;
    }

    function arr_id($id){
        $data['company']=self::company();
        $arr = array(
            'id'=>$id,
            'company_id'=>$data['company'] ['id'],
            'del_flag' =>  '0',
        );
        return $arr;
    }
}